package com.zhuiyun.project.api.message.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * @ClassName message
 * @Description TODO 消息表
 * @Author kdj
 * @Date 2023/6/27 14:13
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Message {
    /**
     * 消息id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 全局uuid
     */
    private String uuid;

    /**
     * 消息类型 1单聊 2群聊 3 系统
     */
    private Integer type;

    public Message(String uuid, int type) {
        this.uuid = uuid;
        this.type = type;
    }
}
